import axios from '@/utils/axios'

export const getParam = (id: string): Promise<ApiResult<SystemParam>> => {
    return axios.get(`system/param/${id}`)
}

export const getParamPage = (pagination: Pagination, params: SystemParam): Promise<ApiResult<Page<SystemParam>>> => {
    return axios.get(`system/param/page/${pagination.page}/${pagination.pageSize}`, { params })
}

export const postOrPutParam = (data: SystemParam): Promise<ApiResult<null>> => {
    return axios.post(`system/param`, data)
}

export const deleteParam = (id: string): Promise<ApiResult<null>> => {
    return axios.delete(`system/param/${id}`)
}
